@file:JvmMultifileClass
@file:JvmName("ThreadKsl")

package hos.ksl

import hos.thread.MainHandler
import hos.thread.ThreadPool

/**
 * <p>Title: ThreadKsl </p>
 * <p>Description:  </p>
 * <p>Company: www.mapuni.com </p>
 *
 * @author : 蔡俊峰
 * @date : 2024-08-11 20:47
 * @version : 1.0
 */
fun postOnMain(block: () -> Unit) = MainHandler.main.postOnMain(block)

fun postToMain(block: () -> Unit) = MainHandler.main.postToMain(block)

fun postIo(block: () -> Unit) = ThreadPool.thread.postIo(block)

fun postOnIo(block: () -> Unit) = ThreadPool.thread.postOnIo(block)

fun postRun(block: Runnable) = ThreadPool.thread.execute(block)